<style lang="scss" scoped>
    @import '../../css/study-plan.scss';
    .paper-info-main{padding: 26px 26px 80px;min-height:600px;background: #fff;}
    .info-head{font-size: 18px;font-weight: bold;padding-bottom: 26px;}
    .info-main-content{text-align: center;border: 1px solid #eee;}
    .info-main-title{padding: 18px 0;background: #fcfdff;border-bottom: 1px solid #eee;}
    .info-main{padding: 18px 0}
    .see-text{color: $mco;cursor: pointer;}
</style>

<template>
    <section>
        <div class="breadcrumb-box">
            <el-breadcrumb separator=" > ">
                <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
                <el-breadcrumb-item v-if="$route.meta">{{$route.meta.title}}</el-breadcrumb-item>
            </el-breadcrumb>
        </div>
        <div class="paper-info-main">
            <div class="info-head">《{{studyTitle}}》学习计划试卷列表</div>
            <div class="info-main-content">
                <el-row class="info-main-title">
                    <el-col :span="4">学员名称</el-col>
                    <el-col :span="7">试卷名称</el-col>
                    <el-col :span="3">考试状态</el-col>
                    <el-col :span="3">考试成绩</el-col>
                    <el-col :span="4">提交时间</el-col>
                    <el-col :span="3">操作</el-col>
                </el-row>

                <template v-for="one in list">
                    <el-row class="info-main">
                        <el-col :span="4">
                            {{one.Username||'-'}}
                        </el-col>
                        <el-col :span="7">
                            {{one.ExamTitle||'-'}}
                        </el-col>
                        <el-col :span="3">
                            {{one.ExamStatus==0?'未考':one.ExamStatus==1?'通过':'未通过'}}
                        </el-col>
                        <el-col :span="3">
                            {{one.GetScore||'-'}}
                        </el-col>
                        <el-col :span="4">
                            {{one.SubmitTime||'-'}}
                        </el-col>
                        <el-col :span="3">
                            <span class="see-text" @click="gotoPath('/study/paper-info?examID='+one.ExamID+'&employeeID='+one.EmployeeID)">查看</span>
                        </el-col>
                    </el-row>
                </template>
            </div>
            <div v-show="pageInfo.total>20">
                <el-pagination class="mt20 fr"
                               background
                               @size-change="getList"
                               @current-change="getList"
                               :current-page.sync="pageInfo.page"
                               :page-size="pageInfo.pageSize"
                               layout="prev, pager, next, jumper"
                               :total="pageInfo.total">
                </el-pagination>
            </div>
        </div>
    </section>

</template>

<script>

import qs from 'qs'

export default{
    data: function(){
        return {
            studyTitle:this.$route.query.studyTitle,
            studyID:this.$route.query.studyID,
            employeeID:this.$route.query.employeeID,
            list:[],
            pageInfo: {
                pageSize: 20,
                total:0,
                page:1
            }
        }
    },
    mixins: [mixinMethods],
    methods: {

    },
    mounted: function(){
        axios.post('/com/exam/getPlanEmployeeExamList', qs.stringify({
            studyID:this.studyID,
            employeeID:this.employeeID
        })).then((res) => {
            var d = res.data;
            if(d.flag == 1){
                this.list = d.data.Rows;
                this.pageInfo.total=Number(d.data.Total);
            }else {
                this.$message.error(d.msg)
            }
        })
    }
}


</script>